<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">


<ui:composition template="/template.xhtml">
	<ui:define name="tituloPagina">
		<p:outputLabel value="#{msgs['paginas.consulta.compromisso.cancelados']}" />
	</ui:define>
	<ui:define name="principal">


		<p:panelGrid columns="7">
			<p:outputLabel value="#{msgs['campos.titulo.responsavel']}" />

			<p:selectOneMenu value="#{compromissoRecusadoBean.responsavelFiltro}"
				style="width: 166px;">
				<f:selectItem itemLabel="#{msgs['campos.combobox.selecione']}"
					itemValue=""></f:selectItem>
				<f:selectItems
					value="#{compromissoRecusadoBean.listaFiltroResponsavel}">


				</f:selectItems>
			</p:selectOneMenu>


			<p:outputLabel value="#{msgs['campos.titulo.reuniao']}" />

			<p:selectOneMenu value="#{compromissoRecusadoBean.reuniaoFiltro}"
				style="width: 242px;">
				<f:selectItem itemLabel="#{msgs['campos.combobox.selecione']}"
					itemValue=""></f:selectItem>
				<f:selectItems value="#{compromissoRecusadoBean.listaFiltroReuniao}">


				</f:selectItems>
			</p:selectOneMenu>

			<p:outputLabel value="#{msgs['campos.titulo.numero.compromisso']}" />
			<p:selectOneMenu
				value="#{compromissoRecusadoBean.numeroCompromissoFiltro}"
				style="width: 166px;">
				<f:selectItem itemLabel="#{msgs['campos.combobox.selecione']}"
					itemValue=""></f:selectItem>
				<f:selectItems
					value="#{compromissoRecusadoBean.listaFiltroNumeroCompromisso}">


				</f:selectItems>
			</p:selectOneMenu>

			<p:commandButton icon="ui-icon-search"
				action="#{compromissoRecusadoBean.listarByFiltros}" ajax="false" />

		</p:panelGrid>



		<br></br>
		<br></br>
		<p:dataTable
			value="#{compromissoRecusadoBean.listaCompromissoRecusado}"
			var="_lista">

			<p:column headerText="Número do Compromisso">
				<p:outputLabel value="#{_lista.compromisso.numeroCompromisso}" />
			</p:column>

			<p:column headerText="#{msgs['campos.titulo.reuniao']}">
				<p:outputLabel value="#{_lista.compromisso.reuniao.dataReuniao}">
					<f:convertDateTime pattern="dd/MM/yyyy hh:mm" timeZone="GMT-03:00" />

				</p:outputLabel>
			</p:column>

			<p:column headerText="Descrição do Compromisso">
				<p:outputLabel value="#{_lista.compromisso.descricao}" />
			</p:column>

			<p:column headerText="#{msgs['campos.titulo.responsavel']}">
				<p:outputLabel value="#{_lista.compromisso.pessoa.nome}" />
			</p:column>


			<p:column headerText="#{msgs['campos.titulo.motivo']}">
				<p:outputLabel value="#{_lista.motivo}" />
			</p:column>

			<p:column>
				<p:commandButton icon="ui-icon-unlocked"
					action="#{compromissoRecusadoBean.revalidarCompromisso()}"
					ajax="false">

					<f:setPropertyActionListener
						target="#{compromissoRecusadoBean.compromissoRecusado}"
						value="#{_lista}" />
				</p:commandButton>
			</p:column>

		</p:dataTable>
	</ui:define>
</ui:composition>
</html>